from  redis import StrictRedis
class Config:
    DEBUG=None
    SECRET_KEY='wtV9VzN80O+gTNVJj4SvXuL36hgfVspB/DFIm2NDLjKidF8teMXgew=='
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/info4'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    REDIS_HOST='127.0.0.1'
    REDIS_PORT=6379
    #配置redis数据库的链接，用来存储session,实现状态保持
    SESSION_TYPE ='redis'
    #对session信息使用签名
    SESSION_USE_SIGNER=True
    #设置sessinon的有效期
    PERMANENT_SESSION_FILETIME=86400
    SESSION_REDIS=StrictRedis(host=REDIS_HOST,port=REDIS_PORT)

class DevelopmentConfig(Config):
    DEBUG = True

class ProductionConfig(Config):
    DEBUG = False


config={
    'Development':DevelopmentConfig,
    'Production':ProductionConfig
}